package org.example.redis.demo;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.SetOperations;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class SetRedisDemo {
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    public void a(){
        SetOperations<String, String> set = stringRedisTemplate.opsForSet();
        set.add("A", "aa","bb","cc","11","22","33","44","55");
        set.add("B", "aa","bb","cc","dd","ee");
        set.add("C", "bb","22","33","ee","44");
    }
    
}
